import './App.css'
import Login from './pages/Login/login'
import Home from './pages/home/index'
import { Routes, Route } from 'react-router-dom';
import AuthProvider from './AuthProvider'
import Layout from './components/Layout'
import RequireAuth from './components/RequireAuth'

function App () {
  return (
    <AuthProvider>
      <Routes>
        <Route path="/login" element={<Login />} />

        <Route element={<Layout />}>
          <Route
            path='/'
            element={
              <RequireAuth>
                <Home />
              </RequireAuth>
            }
          />
        </Route>


      </Routes>
    </AuthProvider>
  )
}

export default App
